package P5.T12;

import javax.swing.*;

public class T12 {
    public static void main(String[] args) {
        JTabbedPane tp=new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT);
        Box[] boxs=new Box[30];
        for(int i=0;i<30;i++){
            boxs[i]=Box.createHorizontalBox();
            for(int j=0;j<5;j++){
                boxs[i].add(new JButton("按钮["+i+","+j+"]"));
            }
            tp.addTab("面板"+i,boxs[i]);
        }
        JFrame jf=new JFrame("高级组件面板测试");
        jf.setContentPane(tp);
        jf.setSize(300,300);
        jf.setVisible(true);
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }
}
